import { types } from './index';

const defaultData = {
  loading: false,
};

export default {
  RenderData(state = defaultData, action) {
    switch (action.type) {
      case types.RenderData:
        return { ...state, ...action.payload };
      case types.Clear:
        return defaultData;
      default:
        return state;
    }
  }
};